Copyright: DTrace Copyright DameWare Development 1998
Citation: DameWare Development 1998


 DTrace Help Index

Properties	Methods	Events

DTrace Custom Control

Description:

DameWare Trace ActiveX component is a 32-bit custom control for use with Visual Basic, Visual C++ and Web pages or any environment that can host ActiveX controls.  DameWare Trace is a diagnostic utility that determines the route taken to a destination by sending Internet Control Message Protocol (ICMP) echo packets with varying Time-To-Live (TTL) values to the destination.  Each router along the path is required to decrement the TTL on a packet by at least 1 before forwarding it, so the TTL is effectively a hop count.  When the TTL on a packet reaches 0, the router is supposed to send back an ICMP Time Exceeded message to the source system.  DTrace determines the route by sending the first echo packet with a TTL of 1 and incrementing the TTL by 1 on each subsequent transmission until the target responds or the maximum TTL is reached.  The route is determined by examining the ICMP Time Exceeded messages sent back by intermediate routers.  Notice that some routers silently drop packets with expired time-to-live (TTLs) and will be invisible to DTrace.

DTrace can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  When used as an edit box window, the DTrace component is virtually automatic, making it very easy to use within your application.  When used as a hidden control object, DTrace is very flexible for the developer to configure with it’s many properties.

The DameWare Trace ActiveX control utilizes the ActiveX Template Library (ATL), which reduces dependencies on other library files.  Additional information on the ATL is available on our web site at: http://www.dameware.com/faq.htm

Registration:

How to register

What do I get when I register

License

Copyright

Installation and Support:

Installation

Technical Support

Using within a Web page


Technical Support

Technical Support is provided in any of the following ways for your convenience:

•  If possible, we prefer that you use e-mail to communicate with us. Because we check e-mail many times daily (most often via our Error! Reference source not found. account), you can be sure we will be able to respond to you quickly.

•  Online FAQ is available at http://www.dameware.com/faq.htm.

•  Online discussion group can be viewed at http://www.dameware.com/discuss.htm.

•  You can fax us at 504-626-1189.

•  You can contact us by phone at 504-626-7545 (recommended to be used as a last resort)

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, La.  70448


How to register
How To Order

For added convenience, you may order DTrace in any of the following ways:

♦	Visit our Web Site at http://www.dameware.com/northstar.htm to order online with your Visa, MasterCard or Discover credit card, fax your order, or order by telephone:

Online at http://www.dameware.com/northstar.htm
Faxed Orders at 1-785-539-3743
Phoned Orders  calls taken 10am - 8pm, EST, Monday-Friday
     1-800-699-6395 (From the USA only)
     1-785-539-3731

Be sure to reference product number #2829 when ordering from NorthStar.

0	Note: Any product or support questions should be sent to support@dameware.com.  NorthStar solutions is a purchase vendor only, for DameWare Development, and unable to answer any questions about our products!

♦	For quantity pricing, please contact DameWare Development at sales@dameware.com.

♦	If you prefer to pay by check, or money order please send order information to:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

♦	For payment by purchase order please send order information to address below, or fax to 504-626-1189:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

Note: NorthStar Solutions does NOT accept purchase orders.


What do I get when I register
What do I get when I order

There are no limitations in this shareware release, but you may encounter a "nag" screen from time to time.  Upon receipt of your order you will receive a license file which will remove the "nag" screen. The product will be registered in your name and you will receive the latest version.  It's a small price to pay for your peace of mind. You may also wish to check on our Web Home Page for the latest version which you have rights to use as a registered user.  Our Web Home Page address is:  http://www.dameware.com.


License Agreement

DTrace is not public domain or free software.

DTrace is copyrighted, and all rights are reserved by DameWare Development.

Licensing:

1. shareware version

You may use the shareware version of DTrace for up to 30 days in your design environment for evaluation purposes only. You may copy and distribute it freely as long as all the files in the package, including the demo programs are distributed with it and no changes or additions of any kind are made to the original package.

2. registered version

As a registered user, you can use DTrace in your design environment and you have a royalty-free right to distribute executables that use DTrace as a runtime component. Only registered users can distribute executables using DTrace.

You may copy the software to facilitate your use of it on as many computers as there are licensed users specified in the license file. Making copies for any other purpose violates international copyright laws. In particular, you are prohibited from distributing a registered version of DTrace, except as a runtime component of one of your applications.

The license file allows you to compile your applications with DTrace. You are not allowed to distribute the DTrace.LIC or DTrace.lpk license files with any application that you distribute.  You are allowed to distribute the DTraceR.LIC with your Windows Scripting Host script(s).

Disclaimer of Warranty:

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS"  WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.

The user must assume the entire risk of using the program.

Your use of this product indicates that you have read and agreed to these terms.


Installation

DameWare Local Group is distributed with a self-extracting installation wizard file - DTraceW.exe.  Once executed, DTraceW.exe will install the DTrace components into a directory of your choosing (c:\Program Files\DameWare\DTrace\ by default), and register the DTrace.dll component into the Windows system registry.

The following is a list of the files installed during the installation wizard process:

DTrace.DLL	32-bit Active DLL Control

DTrace.HLP	On-line documentation

DTrace.CNT	Contents file for On-line documentation

DTrace.EXE	DTrace VB sample executable

DTrace.FRM	DTrace VB sample form

DTrace.VBP	DTrace VB sample project file

DTraceS.EXE	DTrace Simple VB sample executable

DTraceS.FRM	DTrace Simple VB sample form

DTraceS.VBP	DTrace Simple VB sample project file

DTrace.HTM	DTrace Web page sample file

Once you have registered the DTrace component, you will receive the following license files:

DTrace.LIC	License file

DTrace.LPK	License file for web pages

DTraceR.LIC	License file for Windows Scripting Host

Distribution Note:

When you create and distribute applications that use DTrace, you can install the appropriate file in the customer's Microsoft Windows \SYSTEM subdirectory, or any specific directory as long as the component is registered to that subdirectory.

Note: You are not allowed to distribute the DTrace.LIC or DTrace.lpk license files with any application that you distribute. You are allowed to distribute the DTraceR.LIC file with your Windows Scripting Host script(s).


Using within a Web page.
Using in a Web page

DTrace Active control can easily be used in a Web Page.  The following is a simple example.  You may also wish to visit sites such as Microsoft at (http://www.microsoft.com/workshop) or DameWare Development’s home page at (http://www.dameware.com).

<HTML>

<HEAD>

<TITLE>Component html Template for DameWare Trace Route Control</TITLE>

</HEAD>

<BODY>

<p>

<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"

width="0" height="0"><param name="LPKPath" value="DTrace.lpk">

<embed src="DTrace.lpk"></object>

</p>

<p align="center">Enter IP Address or Host Name: <input type="TEXT" value="Yahoo.com" value name="Host" size="20"> </p>

<p align="center"><input type="BUTTON" value="Trace Route" name="BtnTrace">

<p align="center">

<object id="DTraceCtl1"

type="application/x-oleobject"

classid="CLSID:8B42D8D8-AF9E-11D1-A233-00C04FA30E7F"

codebase="DTrace.dll#Version=1, 4, 0, 3"

width="400" height="140">

  <param name="UseWindow" value="1">

  <param name="ScrollBar" value="0">

</object>

</p>

<script language="VBSCRIPT">

Sub BtnTrace_OnClick

'Note: IE will blow-up if you pass a empty string? so check?

If Host.Value = "" Then

MsgBox "Host name required."

Else

DTraceCtl1.Trace Host.Value

End If

End Sub

</script>

</BODY>

</HTML>


Displays appropriate Copyright notices
Copyright

Copyright© 1998 DameWare Development

Portions of this product are Copyrighted (c) 1991-1998 by Microsoft Corporation.

All rights are reserved. All  Microsoft Corporation disclaimers apply.

DTrace is a trademark of DameWare Development.

Microsoft Windows is a registered trademark of Microsoft Corporation.

Microsoft Windows Scripting Host is a registered trademark of Microsoft Corporation.


Displays Properties
Properties

All the properties are listed below. Properties that apply only to

DTrace, or require special consideration when used with it,

are underlined. They are documented in this help file. See the

Visual Basic Language Reference or online Help for

documentation of the remaining properties.

(About)	(Name)
DragIcon	DragMode
Height	HelpContextID
Index	IsRunning
Left	MaxHops
ResolveAddress	ScrollBar
TabIndex	TabStop
Tag	Timeout
ToolTipText	Top
UseWindow	Visible
WhatsThisHelpID	Width


Display the DTrace About box
(About) Property

Properties	Methods	Events

Description

The (About) property will invoke the DameWare DTrace About box dialog.  This dialog is used to display the control’s registration information.

Syntax

DTraceCtl1.AboutBox

Notes

The About box dialog will be displayed in the Windows environment until the control is registered with the license file (DTrace.lic), or the Web environment with the license file (DTrace.lpk).


Determine if DTrace is currently running.
IsRunning Property

Properties	Methods	Events

Description

During your application’s execution, trap whether or not DTrace is currently running.  This property is also used to stop the DTrace execution.

Syntax

DTraceCtl1.IsRunning [ = {False | True}]

Data Type

Boolean

Example

Private Sub Timer1_Timer()

DTraceCtl1.IsRunning = False       ‘ stop execution of DTrace

If DTraceCtl1.IsRunning Then        ‘ determine is DTrace is running

Shape1.FillColor = &HFF&

Command2.Enabled = True

Else

Shape1.FillColor = &HFF00&

Command2.Enabled = False

Command1.Enabled = True

End If

End Sub


Specify the maximum number of hops to search for each target.
MaxHops Property

Properties	Methods	Events

Description

Specifies the maximum number of hops to search for each target.  The default is 30 hops.

Syntax

DTraceCtl1.MaxHops = 20

Data Type

Integer

Example

Private Sub Form_Load()

DTraceCtl1.MaxHops = 20

End Sub


If specified, DTrace will resolve IP address to the computer name.
ResolveAddress Property

Properties	Methods	Events

Description

Specifies whether to resolve IP Addresses to computer name, during the DTrace call.

Syntax

DTraceCtl1.ResolveAddress [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DTraceCtl1.ResolveAddress = False

End Sub


Specify to display a scrollbar when used with UseWindow property.
ScrollBar Property

Properties	Methods	Events

Description

DTrace can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  When used as an edit box window, the scrollbar property specifies whether to display scroll bars around the list box.

Syntax

DTraceCtl1.ScrollBar  [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DTraceCtl1.ScrollBar = False

End Sub

See Also

UseWindow


Specify a timeout interval in milliseconds.
Timeout Property

Properties	Methods	Events

Description

Specifies a timeout interval in milliseconds to be used during the DTrace call.

Syntax

DTraceCtl1.Timeout = 1000

Data Type

Long

Example

Private Sub Form_Load()

DTraceCtl1.Timeout = 1000

End Sub


Specify to use the DTrace component with a display window.
UseWindow Property

Properties	Methods	Events

Description

DTrace can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  This property is used to specify which mode to use.  When set to 1-True, DTrace will use the edit box window mode.  When set to 0-False, DTrace will use the hidden control object mode.

Notes

Please refer to the DTraceS sample routine for an example using the edit box window.

Syntax

DTraceCtl1.UseWindow  [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DTraceCtl1.UseWindow = False

End Sub

See Also

ScrollBar


Displays Methods
Methods

All of the methods are listed below. Methods that apply only to

DTrace, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

Trace


Initiate a trace call with DTrace using the options specified.
Trace Method

Properties	Methods	Events

Description

Initiate a Trace call with DTrace using the options specified.

Syntax

DTraceCtl1.Trace Text6.Text

Data Type

String

Example

Private Sub Command1_Click()

DTraceCtl1.ResolveAddress = Check2.Value

DTraceCtl1.MaxHops = CLng(Text2.Text)

DTraceCtl1.Timeout = CLng(Text4.Text)

DTraceCtl1.Trace Text6.Text

If Check3.Value = 0 Then

    Text1.Text = "Tracing route to " + Text6.Text + " over a maximum of " + Text2.Text + " hops:" + Chr(13) + Chr(10) + Chr(13) + Chr(10)

End If

End Sub


Displays Events
Events

All the events are listed below. Events that apply only to

DTrace, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

DragDrop

DragOver

GotFocus

LostFocus

OnTrace

OnTraceError

OnTraceStr


Trap the values returned by DTrace during a call.
OnTrace Event

Properties	Methods	Events

Description

Trap the values returned by DTrace during a call.

Data Type

String,String,Long,Long,Long

Example

Private Sub DTraceCtl1_OnTrace(ByVal strIpAddress As String, ByVal strHostName As String, ByVal lHop As Long, ByVal lProbe As Long, ByVal lTime As Long)

If Check3.Value = 0 Then

If lTime = -1 Then

StrTime$ = "*"

Else

StrTime$ = LTrim(Str(lTime)) + " ms"

End If

StrHop$ = LTrim(Str(lHop))

If lProbe = 3 Then

If strHostName = "" Then

StrHost$ = strIpAddress

Else

StrHost$ = strHostName + " [" + strIpAddress + "]"

End If

End If

If lProbe = 1 Then

Text1.Text = Text1.Text + StrHop$

End If

If lHop = -1 Then

Text1.Text = Text1.Text + "Trace Route complete."

Else

Text1.Text = Text1.Text + Chr(9) + StrTime$

End If

If lProbe = 3 And lHop > -1 Then

Text1.Text = Text1.Text + Chr(9) + StrHost$ + Chr(13) + Chr(10)

End If

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End If

End Sub

See Also

OnTraceError

OnTraceStr


Trap the error string returned by DTrace during a call.
OnTraceError Event

Properties	Methods	Events

Description

Trap the error code and error string returned by DTrace during a call if an error occurs.

Data Type

String,Long

Example

Private Sub DTraceCtl1_OnTraceError(ByVal strError As String, ByVal lError As Long)

Text1.Text = Text1.Text + strError

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End Sub

See Also

OnTrace

OnTraceStr


Trap the entire string returned by DTrace during a call.
OnTraceStr Event

Properties	Methods	Events

Description

Trap the string returned by DTrace during a call.  This string contains the data returned from the DTrace call, in a pre-formatted state.

Data Type

String

Example

Private Sub DTraceCtl1_OnTraceStr(ByVal strPing As String)

If Check3.Value = 1 Then

Text1.Text = Text1.Text + strPing

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End If

End Sub

See Also

OnTrace

OnTraceError